package com.dq.service.set.impl;

import com.dq.domain.setup.TrackGenerateRateSet;
import com.dq.repository.set.TrackGenerateRateSetRepository;
import com.dq.service.set.TrackGenerateRateSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author luchangtong
 * @Date 2019/12/9 11:16
 */
@Service
public class TrackGenerateRateSetServiceImpl implements TrackGenerateRateSetService {
    @Autowired
    TrackGenerateRateSetRepository trackGenerateRateSetRepository;
    @Override
    public TrackGenerateRateSet get(TrackGenerateRateSet.SetStatus status) {
        return trackGenerateRateSetRepository.getByStatusAndDeletedFalse(status);
    }

    @Override
    public void update(TrackGenerateRateSet trackGenerateRateSet) {
        trackGenerateRateSetRepository.save(trackGenerateRateSet);
    }
}
